#include "reg52.h"
#include "can_func.c"
#include "can_irq.c"

void main()
{
//	 received_data = 300;	//receive data storge at 0x300 in ex_ram //move to test func
	 info	=	0x2000;				//test information storge at 0x2000 in ex_ram
	 
 	 EA =	1;
	 ECAN = 1;
	 ECAN2 = 1;
	 InitCan_Basic(0x43,0x2F,0xAB,0x00);
	 InitCan2_Basic(0x43,0x2F,0xAB,0x00);

	 
	 //can_basic_polling_test();	//test trans/receive by polling & IR reg: when interrupt disable, read should be 0xE0
	 							//if test ok, P0 output 'Y'; if failed ,PO output 'N'		
	 //can_basic_irq_test();    //test trans/receive by irq. 

	 can_basic_id_test();

	 while(1);
}

